package com.it.exprezoorecords.json;

import utility.ApplicationProperties;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

import com.it.exprezoorecords.R;

public class AboutUs extends Activity {


	public void onCreate(Bundle savedInstanceState) {
    	
    	super.onCreate(savedInstanceState);
        setContentView(R.layout.aboutus);
        
        
        TextView emailTxt = (TextView) findViewById(R.id.emailTxt);        
        emailTxt.setOnClickListener(new OnClickListener() {			

			public void onClick(View v) {
		        final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
		        /* Fill it with Data */
		        emailIntent.setType("plain/text");
		        emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{ApplicationProperties.EMAIL_RECEIVER});
		        emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject");
		        emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Text");
		        /* Send it off to the Activity-Chooser */
		        AboutUs.this.startActivity(Intent.createChooser(emailIntent, "Send mail..."));
			}
		});
        
        
        Button fbBtn = (Button) findViewById(R.id.facebookBtn);        
        fbBtn.setOnClickListener(new OnClickListener() {			

			public void onClick(View v) {
				Uri uri = Uri.parse(ApplicationProperties.FB_URL);
				 Intent intent = new Intent(Intent.ACTION_VIEW, uri);
				 startActivity(intent);
			}
		});

        Button scBtn = (Button) findViewById(R.id.soundcloudBtn);        
        scBtn.setOnClickListener(new OnClickListener() {			

			public void onClick(View v) {				
			Uri uri = Uri.parse(ApplicationProperties.SOUNDCLOUD_URL);
			 Intent intent = new Intent(Intent.ACTION_VIEW, uri);
			 startActivity(intent);
			 }
		});

        Button ytBtn = (Button) findViewById(R.id.youtubeBtn);        
        ytBtn.setOnClickListener(new OnClickListener() {			
			
			public void onClick(View v) {				
			 Uri uri = Uri.parse(ApplicationProperties.YOUTUBE_URL);
			 Intent intent = new Intent(Intent.ACTION_VIEW, uri);
			 startActivity(intent);			 
			}
		});
                
	}
}
